<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOrderPickingTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_shipment', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('order_id')->unique()->comment('订单号');
            $table->unsignedBigInteger('customer_id')->comment('客户ID');
            $table->tinyInteger('type')->comment('0 一单一品 1 一单多品');
            $table->string('info')->comment('订单ID*数量|订单ID*数量');
            $table->string('remark')->comment('订单ID|订单ID');
            $table->tinyInteger('status')->default(0)->comment('状态: 0待生成 1待下架 2待打包 3待发货 4已发货');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_shipment');
    }
}
